<DOCTYPE html>
  <html lang="en">

  <head charset="utf-8">
    <title></title>
  </head>

  <body>
    <script>
      function Dictionary() {
        this.items = {};

        Dictionary.prototype.has = key => {
          for (let i = 0; i < this.size(); i++) {
            if (key == this.keyShow()[i]) {
              return true
            }
          }
          return false
        }

        Dictionary.prototype.set = (key, value) => {
          if (this.has(key)) {
            this.item[key] = value
          }
          this.items[key] = value
        }

        Dictionary.prototype.get = key => {
          if (this.has(key)) {
            return this.item[key]
          }
          return null
        }

        Dictionary.prototype.keyShow = () => {
          return Object.keys(this.items)
        }

        Dictionary.prototype.valueShow = () => {
          let result = []
          for (let i = 0; i < this.size(); i++) {
            result.push(this.items[this.keyShow()[i]])
          }
          return result
        }

        Dictionary.prototype.size = () => {
          return Object.keys(this.items).length
        }

        Dictionary.prototype.remove = key => {
          if (this.has(key)) {
            delete this.items[key]
            return
          }
          return null
        }

        Dictionary.prototype.clear = () => {
          this.items = {}
        }
      }

      let dictionary =new Dictionary();
      dictionary.set(1,"a");
      dictionary.set(2,"b");
      console.log(dictionary.valueShow());
    </script>
  </body>

  </html>